package com.budwk.app.sqfwV2.service.shawenTown;

import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.fastjson.JSONObject;
import com.budwk.app.common.config.AppException;
import com.budwk.app.sqfw.component.FromSummaryComponent;
import com.budwk.app.sqfw.constants.CommonConstants;
import com.budwk.app.sqfw.constants.SqfwFormSummaryConstants;
import com.budwk.app.sqfw.enums.DownLoadFileNameEnum;
import com.budwk.app.sqfw.enums.SqfwFormSummaryFieldEnum;
import com.budwk.app.sqfw.enums.SupportBusinessTypeEnum;
import com.budwk.app.sqfw.models.Sqfw_formSummary_new;
import com.budwk.app.sqfw.services.SqfwFormsummaryNewService;
import com.budwk.app.sqfwDoc.codeGenerator.pdfGenerate.AbstractCustomerPdfCreateField;
import com.budwk.app.sqfwDoc.codeGeneratorV2.fileParam.CompleteFlowBusinessParam;
import com.budwk.app.sqfwDoc.codeGeneratorV2.fileParam.CompleteFlowPdfParamForController;
import com.budwk.app.sqfwDoc.codeGeneratorV2.fileParam.PdfGenerateParam;
import com.budwk.app.sqfwDoc.codeGeneratorV2.generate.BasePdfGenerator;
import com.budwk.app.sqfwDoc.codeGeneratorV2.pdfService.CompleteFlowCommonPdfService;
import com.budwk.app.sqfwDoc.codeGeneratorV2.result.GeneratorPdfWordResult;
import com.budwk.app.sqfwV2.component.ShawenTownComponent;
import com.budwk.app.sqfwV2.constants.ProblemConstant;
import com.budwk.app.sqfwV2.dto.entity.SqfwProblemInfo;
import com.budwk.app.sqfwV2.dto.entity.SqfwShopsBaseInfo;
import com.budwk.app.sqfwV2.dto.shawenTown.SWTownProblemVo;
import com.budwk.app.sqfwV2.dto.shawenTown.ShawenTownSafetyPdfDTO;
import com.budwk.app.sqfwV2.dto.shawenTown.ShawenTownSafetyProblemVo;
import com.budwk.app.sqfwV2.enums.RectificateTimeEnum;
import com.budwk.app.sqfwV2.generator.shawenTown.pdf.ElectricBicyclesWordGenerator;
import com.budwk.app.sqfwV2.generator.shawenTown.pdf.ShawenPictureGenerator;
import com.budwk.app.sqfwV2.generator.shawenTown.pdf.ShawenTownSafetyWordGenerator;
import com.budwk.app.sqfwV2.service.ProblemInfoService;
import com.budwk.app.sqfwV2.service.ShopsBaseInfoService;
import com.budwk.app.sys.models.Sys_user;
import com.budwk.app.sys.services.SysUserService;
import com.budwk.app.util.DateUtils;
import com.budwk.app.util.StrUtil;
import com.budwk.app.util.poiUtils.nutzBeanUtils.NutzIocUtils;
import com.budwk.starter.security.utils.SecurityUtil;
import com.google.common.collect.Lists;
import org.apache.commons.lang3.StringUtils;
import org.nutz.dao.Cnd;
import org.nutz.dao.util.cri.SqlExpressionGroup;
import org.nutz.dao.util.cri.Static;
import org.nutz.ioc.loader.annotation.IocBean;

import java.util.*;
import java.util.stream.Collectors;

/**
 * @author 东方祥云低代码1.1
 * @since 2024-03-11
 *
 * 沙文消防安全排查 ShawenTownSafety
 */
@IocBean
public class ShawenTownSafetyPdfService extends CompleteFlowCommonPdfService{

    @Override
    public void createPdfAndMsg(CompleteFlowPdfParamForController paramForController) {
        super.createPdfAndMsg(paramForController);
    }

    @Override
    public GeneratorPdfWordResult createPdfSync(CompleteFlowPdfParamForController paramForController) {
        return super.createPdfSync(paramForController);
    }

    /**
     * 获取用户自定义字段 代码生成器已经自动填充
     * 无需特殊修改
     *
     * @param paramData json字符串
     * @return 结果
     */
    @Override
    protected AbstractCustomerPdfCreateField getCustomerPdfField(String paramData) {
        return JSONObject.parseObject(paramData, ShawenTownSafetyPdfDTO.class);
    }

    /**
    * 允许用户自定义填充在创建pdf时所提供的数据
    *
    * @param pdfGenerateParam 创建pdf所提供的数据
    */
    @Override
    protected void customerPopularPdfGenerateParam(PdfGenerateParam pdfGenerateParam) {

    }

    /**
     * 在这里设置生成pdf的所有generator
     *
     * @param pdfGenerateParam 创建pdf的参数
     * @return 生成pdf的generator合集
     */
    @Override
    protected List<BasePdfGenerator> getPdfGenerator(PdfGenerateParam pdfGenerateParam) {
        List<BasePdfGenerator> generatorList = Lists.newArrayList();
        // 在这里添加自己的generator
        ShawenTownSafetyWordGenerator shawenTownSafetyWordGenerator = new ShawenTownSafetyWordGenerator();
        if (shawenTownSafetyWordGenerator.pdfCreateConditionCheck(pdfGenerateParam)) {
            generatorList.add(shawenTownSafetyWordGenerator);
        }
        ElectricBicyclesWordGenerator electricBicyclesWordGenerator = new ElectricBicyclesWordGenerator();
        if (electricBicyclesWordGenerator.pdfCreateConditionCheck(pdfGenerateParam)) {
            generatorList.add(electricBicyclesWordGenerator);
        }
        generatorList.add(new ShawenPictureGenerator());
        return generatorList;
    }

    /**
    * 用户自定义下载pdf文件的名称
    *
    * @param pdfGenerateParam 创建pdf所提供的参数
    * @return 结果
    */
    @Override
    protected String getDownloadFileName(PdfGenerateParam pdfGenerateParam) {
        return DownLoadFileNameEnum.SHAWEN_INVESTIGATE_RENOVATE.getName();
    }

    private void checkParam(Sqfw_formSummary_new formSummary) {
        if (formSummary == null) {
            throw new AppException("请求参数为空！");
        }
        if (StringUtils.isEmpty(formSummary.getParamData())) {
            throw new AppException("请求参数paramData为空！");
        }
    }

    private Sqfw_formSummary_new queryLastData(Sqfw_formSummary_new formSummary, ShawenTownSafetyPdfDTO pdfDTO, String userId) {
        if (StringUtils.isEmpty(pdfDTO.getAddress())) {
            throw new AppException("地址不能为空!");
        }
        SqfwFormsummaryNewService formsummaryNewService = NutzIocUtils.getBean(SqfwFormsummaryNewService.class);
        SysUserService userService = NutzIocUtils.getBean(SysUserService.class);
        Sys_user user = userService.fetch(userId);
        Cnd cnd = Cnd.NEW();
        SqlExpressionGroup where = cnd.where();
        where.andEquals(Sqfw_formSummary_new::getUnitId, user.getUnitId())
                .andEquals(Sqfw_formSummary_new::getType, ShawenTownComponent.FILL_TYPE);
        String sql = "param_data ->>'address'='"+ pdfDTO.getAddress() +"'";
        where.and(new Static(sql));
        List<Sqfw_formSummary_new> formSummaryNews = formsummaryNewService.query(cnd);
        if (formSummaryNews.size() == 0) {
            return null;
        }
        // 取出小于当前提交时间的所有数据
        List<Sqfw_formSummary_new> formSummaryData = formSummaryNews.stream().filter(e -> e.getCreateDate().getTime() < formSummary.getCreateDate().getTime()).collect(Collectors.toList());
        if (formSummaryData.size() > 0) {
            return formSummaryData.get(0);
        }
        return null;
    }

    @Override
    protected void beforeInsertForSummary(Sqfw_formSummary_new formSummary) {
        // 参数校验
        checkParam(formSummary);
        // 入库前参数准备
        buildBeforeParam(formSummary, SecurityUtil.getUserId());
        // 入库商铺表
        insertShop(formSummary);
    }

    private void insertShop(Sqfw_formSummary_new formSummary) {
        // 如果是小型是是的话
        ShawenTownSafetyPdfDTO pdfDTO = JSONObject.parseObject(formSummary.getParamData(), ShawenTownSafetyPdfDTO.class);
        ShawenTownSafetyProblemVo small = pdfDTO.getSmallBusinessEstablishment();
        if (CommonConstants.FALSE.equals(small.getKey())) {
            return;
        }
        ShopsBaseInfoService shopsBaseInfoService = NutzIocUtils.getBean(ShopsBaseInfoService.class);
        SqfwShopsBaseInfo shopsBaseInfo = JSONObject.toJavaObject(JSONObject.parseObject(formSummary.getParamData()), SqfwShopsBaseInfo.class);
        shopsBaseInfo.setPlaceName(small.getPlaceName())
                .setPlaceArea(small.getPlaceArea())
                .setMainBusinessScope(small.getMainBusinessScope())
                .setBusinessLicenseName(small.getBusinessLicensePhoto())
                .setSocialCreditCode(small.getSocialCreditCode())
                .setAddress(pdfDTO.getAddress())
                .setOperator(small.getLegalName())
                .setServiceType(SupportBusinessTypeEnum.BATYUN_SAFE.getCode())
                .setOperatorTelephone(small.getLegalMobile());
        SqfwShopsBaseInfo shopsBaseInfo1 = shopsBaseInfoService.insertOrUpdateData(shopsBaseInfo, formSummary);
        formSummary.setShopsBaseInfoId(shopsBaseInfo1.getId());
    }


    private void buildBeforeParam(Sqfw_formSummary_new formSummary, String userId) {
        // 数据准备
        ShawenTownSafetyPdfDTO pdfDTO = JSONObject.parseObject(formSummary.getParamData(), ShawenTownSafetyPdfDTO.class);
        // 2 获取上一次的数据
        Sqfw_formSummary_new lastData = queryLastData(formSummary, pdfDTO, userId);
        if (lastData != null) {
            pdfDTO.setLastSummaryId(lastData.getId());
        }
        List<String> patrolContents = new ArrayList<>();// 入户安全巡查说明参数
        List<String> bicycleRisks = new ArrayList<>();// 电动车隐患说明
        List<SWTownProblemVo> fireIssues = new ArrayList<>(); // 存在的安全隐患
        // 2.1 是否为小型经营场所
        buildSmallBusinessEstablishment(pdfDTO, patrolContents, fireIssues);
        // 2.2 是否有电动自行车
        buildElectricBicycle(pdfDTO, bicycleRisks, fireIssues);
        pdfDTO.setPatrolContents(String.join(";\n", patrolContents));
        pdfDTO.setElectricBicycleRisk(String.join(";\n", bicycleRisks));
        // 隐患状态
        pdfDTO.setIssueStatus(fireIssues.size() > 0 ? CommonConstants.TRUE : CommonConstants.FALSE);
        // 隐患类型
        pdfDTO.setFireIssues(fireIssues);
        // 设置检查状态、
        buildInpsectionStatus(formSummary, lastData, userId);
        if (fireIssues.size() > 0) {
            pdfDTO.setExistDangerStr(fireIssues.stream().map(SWTownProblemVo::getHazardDesc).collect(Collectors.joining(";\n")));
        }
        ShawenTownSafetyPdfDTO f = StrUtil.serializerData(ShawenTownSafetyPdfDTO.class, pdfDTO);
        formSummary.setFillDate(DateUtils.toDateByLocalDateTime(pdfDTO.getFillDate()));
        formSummary.setParamData(JSONObject.toJSONString(f));
    }

    private void buildInpsectionStatus(Sqfw_formSummary_new formSummary, Sqfw_formSummary_new lastData, String userId) {
        // 1 设置状态
        FromSummaryComponent.buildInspection(formSummary);
        // 2 修改上次数据
        if (lastData != null) {
            SysUserService userService = NutzIocUtils.getBean(SysUserService.class);
            Sys_user user = userService.fetch(userId);
            lastData.setCheckStatus(SqfwFormSummaryFieldEnum.check_status_checked.getCode())
                    .setUpdateDate(new Date())
                    .setUpdateBy(userId)
                    .setUpdateUserPhone(user.getMobile())
                    .setUpdateUserName(user.getUsername());
            SqfwFormsummaryNewService formsummaryNewService = NutzIocUtils.getBean(SqfwFormsummaryNewService.class);
            formsummaryNewService.updateIgnoreNull(lastData);
        }
    }

    private void buildElectricBicycle(ShawenTownSafetyPdfDTO pdfDTO, List<String> bicycleRisks, List<SWTownProblemVo> fireIssues) {
        ShawenTownSafetyProblemVo b = pdfDTO.getElectricBicycle();
        if (b == null || StringUtils.isEmpty(b.getKey()) || CommonConstants.FALSE.equals(b.getKey())) {
            b = new ShawenTownSafetyProblemVo();
            b.setKey(CommonConstants.FALSE);
            bicycleRisks.add("没有电动车");
            return;
        }
        List<SWTownProblemVo> params = getElectricBicycleParams(b, bicycleRisks);
        // 获取前7个问题
        List<SWTownProblemVo> sevenDefaults = ShawenTownComponent.getSevenDefaults();
        // 初始化前7个问题
        for (SWTownProblemVo allDefault : sevenDefaults) {
            buildProblemParam(params, bicycleRisks, allDefault, fireIssues);
        }
        // 7个问题是否都是默认值
        if(bicycleRisks.size() == 0) {
            bicycleRisks.add("未违规使用电动车");
            return;
        }
        List<SWTownProblemVo> recTwos = ShawenTownComponent.getTwoDefaults();
        // 存在不是默认值的情况 判断剩下的2个问题
        for (SWTownProblemVo allDefault : recTwos) {
            buildProblemParam(params, bicycleRisks, allDefault, fireIssues);
        }
        // 是否下达整改意见
        buildIsRectificationNotice(params, bicycleRisks, fireIssues);
        // 是否罚款
        buildFineOrNot(params, bicycleRisks, fireIssues);
        // 处理字典数据
        handleDictName(params);
    }

    private void handleDictName(List<SWTownProblemVo> params) {
        for (SWTownProblemVo param : params) {
            if (StringUtils.isEmpty(param.getRectificateType())) {
                continue;
            }
            param.setRectificateName(RectificateTimeEnum.getNameByCode(param.getRectificateType()));
        }
    }

    private List<SWTownProblemVo> getElectricBicycleParams(ShawenTownSafetyProblemVo b, List<String> bicycleRisks) {
        List<SWTownProblemVo> list = b.getParams();
        if (CollectionUtil.isEmpty(list)) {
            bicycleRisks.add("未违规使用电动车");
            return ShawenTownComponent.getSevenDefaults();
        }
        return list;
    }

    public void buildFineOrNot(List<SWTownProblemVo> list, List<String> bicycleRisks, List<SWTownProblemVo> fireIssues) {
//        ElectricBicycleProblemEnum allDefault = ElectricBicycleProblemEnum.REC_THREE;
        ProblemInfoService problemInfoService = NutzIocUtils.getBean(ProblemInfoService.class);
        SqfwProblemInfo p = problemInfoService.findByCodeAndFields(ProblemConstant.BAIYUN_SAFETY_CHECK_ELEC_FOUR, ProblemConstant.FINE_OR_NOT);
        Optional<SWTownProblemVo> optional = list.stream().filter(e -> p.getFields().equals(e.getFields())).findFirst();
        // 1 前端未传递该参数
        if (optional.isEmpty()) {
            SWTownProblemVo s = ShawenTownComponent.initData(p);
            list.add(s);
            return;
        }
        SWTownProblemVo sp = optional.get();
        sp.setRiskDesc(p.getRiskDesc()).setRiskCode(String.valueOf(p.getRiskCode()));
        // 2 前端传递了参数，但是和默认值一致
        if (sp.getKey().equals(p.getDefaultValue())) {
            return;
        }
        // 3 前端传递了参数 和默认值不一致
        if (sp.getPenaltyAmount() == null) {
            throw new AppException("罚款罚款金额为空！");
        }
        String detailNew = p.getHarardDesc().replace("%s", String.valueOf(sp.getPenaltyAmount()));
        bicycleRisks.add(detailNew);
        sp.setHazardDesc(detailNew);
        fireIssues.add(sp);
    }

    /**
     * 构建问题数据
     * @param list
     * @param bicycleRisks
     * @param allDefault
     */
    private void buildProblemParam(List<SWTownProblemVo> list, List<String> bicycleRisks,
                                   SWTownProblemVo allDefault, List<SWTownProblemVo> fireIssues) {
        Optional<SWTownProblemVo> optional = list.stream().filter(e -> allDefault.getFields().equals(e.getFields())).findFirst();
        // 1 前端未传递该参数
        if (optional.isEmpty()) {
            list.add(allDefault);
            return;
        }
        SWTownProblemVo sp = optional.get();
        // 2 前端传递了参数，但是和默认值一致
        if (sp.getKey().equals(allDefault.getKey())) {
            // 判断上一次的数据是否存在问题
            return;
        }
        ProblemInfoService problemInfoService = NutzIocUtils.getBean(ProblemInfoService.class);
        List<SqfwProblemInfo> problemInfos = problemInfoService.listByCodes(List.of(ProblemConstant.BAIYUN_SAFETY_CHECK_ELEC_SEVEN, ProblemConstant.BAIYUN_SAFETY_CHECK_ELEC_FOUR));
        SqfwProblemInfo p = problemInfos.stream().filter(e -> e.getFields().equals(sp.getFields())).findFirst().get();
//        ElectricBicycleProblemEnum e = ElectricBicycleProblemEnum.getEnumByCode(sp.getFields());
        sp.setHazardDesc(p.getHarardDesc());
        // 3 前端传递了参数 和默认值不一致
        bicycleRisks.add(p.getHarardDesc());
        fireIssues.add(sp);
    }

    public void buildIsRectificationNotice(List<SWTownProblemVo> list, List<String> bicycleRisks,
                                           List<SWTownProblemVo> fireIssues) {

        ProblemInfoService problemInfoService = NutzIocUtils.getBean(ProblemInfoService.class);
        SqfwProblemInfo recOne = problemInfoService.findByCodeAndFields(ProblemConstant.BAIYUN_SAFETY_CHECK_ELEC_FOUR, ProblemConstant.ELEC_FICATION_NOTICE);
        Optional<SWTownProblemVo> optional = list.stream().filter(e -> recOne.getFields().equals(e.getFields())).findFirst();
        if (optional.isEmpty()) {
            SWTownProblemVo s = ShawenTownComponent.initData(recOne);
            bicycleRisks.add(recOne.getHarardDesc() + "");
            list.add(s);
            return;
        }
        SWTownProblemVo sp = optional.get();
        sp.setRiskDesc(recOne.getRiskDesc()).setRiskCode(String.valueOf(recOne.getRiskCode()));
        // 2 前端传递了参数，但是和默认值一致
        if (sp.getKey().equals(recOne.getDefaultValue())) {
            // 判断上一次的数据是否存在问题
            bicycleRisks.add(recOne.getHarardDesc() + "");
            return;
        }
        fireIssues.add(sp);
    }

    private void buildIsKnowledge(ShawenTownSafetyProblemVo small, List<String> patrolContents) {
        // 3 宣传消防知识和消防应知应会
        SWTownProblemVo isKnowledge = small.getIsKnowledge();
        if (isKnowledge == null) {
            isKnowledge = new SWTownProblemVo();
            isKnowledge.setKey(CommonConstants.TRUE);
        }
        if (CommonConstants.FALSE.equals(isKnowledge.getKey())) {
            patrolContents.add("未宣传消防知识和消防应知应会");
        } else {
            patrolContents.add("已宣传消防知识和消防应知应会");
        }
    }

    // 初始化小型经营场所地址
    private ShawenTownSafetyProblemVo initSmallBusinessEstablishment(ShawenTownSafetyPdfDTO pdfDTO) {
        ShawenTownSafetyProblemVo small = pdfDTO.getSmallBusinessEstablishment();
        if (small == null) {
            small = new ShawenTownSafetyProblemVo();
            small.setKey(CommonConstants.FALSE);
        }
        return small;
    }

    private void buildSmallBusinessEstablishment(ShawenTownSafetyPdfDTO pdfDTO, List<String> patrolContents, List<SWTownProblemVo> fireIssues) {
        // 1 初始化数据
        ShawenTownSafetyProblemVo small = initSmallBusinessEstablishment(pdfDTO);
        // 2 未宣传消防知识和消防应知应会
        buildIsKnowledge(small, patrolContents);
        if (CommonConstants.FALSE.equals(small.getKey())) {
            patrolContents.add("不是小营经营场所，无需消防入户安全巡查");
            pdfDTO.setSmallBusinessEstablishment(small);
            return;
        }
        List<SWTownProblemVo> params = small.getParams();
        if (CollectionUtil.isEmpty(params)) {
            // 给默认值
            params = ShawenTownComponent.getHazardsDefaults();
        }
        small.setParams(params);
        // 3 解析安全问题
        buildHiddenDanger(small, fireIssues, patrolContents);
        handleDictName(params);
    }

    private void buildHiddenDanger(ShawenTownSafetyProblemVo small, List<SWTownProblemVo> fireIssues, List<String> patrolContents) {
        boolean isDefaultValue = true; // 是否全是默认值 默认是
        List<SWTownProblemVo> params = small.getParams();
        // 获取所有问题的默认值
        List<SWTownProblemVo> allDefaults = ShawenTownComponent.getHazardsDefaults();
        for (SWTownProblemVo allDefault : allDefaults) {
            // 检查是否传递了参数
            Optional<SWTownProblemVo> optional = params.stream().filter(e -> e.getFields().equals(allDefault.getFields())).findAny();
            if (optional.isEmpty()) {
                // 没有传递参数 初始默认值
                params.add(allDefault);
                continue;
            }
            SWTownProblemVo paramDTO = optional.get();
            if (!paramDTO.getKey().equals(allDefault.getKey())) {
                paramDTO.setRiskDesc(paramDTO.getRiskDesc()).setHazardDesc(paramDTO.getRiskDesc());
                isDefaultValue = false;
                fireIssues.add(paramDTO);
                String dangers = String.format("%s%s%s%s", "隐患：", paramDTO.getHazardDesc(), "，措施：", paramDTO.getRectificationMeasure());
                patrolContents.add(dangers);
            }
        }
        // 2 获取其他隐患
        List<SWTownProblemVo> otherDangers = getOtherDangers(small);
        for (SWTownProblemVo paramDTO : otherDangers) {
            if (paramDTO.getKey().equals(CommonConstants.TRUE)) {
                isDefaultValue = false;
                fireIssues.add(paramDTO);
                String dangers = String.format("%s%s%s%s", "隐患：", paramDTO.getHazardDesc(), "，措施：", paramDTO.getRectificationMeasure());
                patrolContents.add(dangers);
            }
        }
        if (isDefaultValue) {
            patrolContents.add("未发现安全隐患");
        }
    }

    private List<SWTownProblemVo> getOtherDangers(ShawenTownSafetyProblemVo small) {
        List<SWTownProblemVo> otherDangers = small.getOtherDangers();
        if (CollectionUtil.isEmpty(otherDangers)) {
            otherDangers = new ArrayList<>();
            SWTownProblemVo s = new SWTownProblemVo();
            s.setKey(CommonConstants.FALSE).setFields("otherDangers");
            otherDangers.add(s);
        }
        otherDangers.forEach(e -> e.setFields("otherDangers"));
        small.setOtherDangers(otherDangers);
        return otherDangers;
    }

    /**
    * 第五张表中的需要的类型，详情见 {@link SqfwFormSummaryConstants}
    *
    * @return 返回数据
    */
    @Override
    public String getSummaryType() {
        return ShawenTownComponent.FILL_TYPE;
    }

    @Override
    protected void customerPopularPdfGenerateParam(PdfGenerateParam pdfGenerateParam, Map<String, Object> customerBusinessDataMap) {
        // 获取新表数据
        Sqfw_formSummary_new formSummary = ((CompleteFlowBusinessParam) pdfGenerateParam.getBusinessParam()).getFormSummary();
        String paramData = formSummary.getParamData();
        // 数据前准备
        buildBeforeParam(formSummary, formSummary.getCreateBy());
        String paramData1 = formSummary.getParamData();
        if (!paramData1.equals(paramData)) {
            SqfwFormsummaryNewService sqfwFormsummaryNewService = NutzIocUtils.getBean(SqfwFormsummaryNewService.class);
            Sqfw_formSummary_new formSummaryNew = sqfwFormsummaryNewService.fetch(formSummary.getId());
            formSummaryNew.setParamData(paramData1);
            sqfwFormsummaryNewService.updateIgnoreNull(formSummaryNew);

            ShawenTownSafetyPdfDTO roadPdfDTO = JSONObject.parseObject(paramData1, ShawenTownSafetyPdfDTO.class);
            pdfGenerateParam.setAbstractCustomerPdfCreateField(roadPdfDTO);
        }
    }
}
